package com.wframe.project.jnd.util;

import com.frame.database.JdataBean;
import com.wframe.project.jnd.entity.Promotion;
import com.wframe.project.jnd.vo.CartBean;
import com.wframe.project.jnd.vo.CartItem;

import java.util.List;
import java.util.Map;

/**
 * Created by lwb on 2017/6/3.
 */
public interface PromotionBuilder {
    Promotion build(String promotionId) throws Exception;

    boolean checkInventoryChange(Map<String, Integer> session, CartBean tempProductStock);

    CartBean getCartProducts(String userid, String promotionId, List<CartItem> items, int platform, Map<String, Integer> tempProductStock) throws Exception;

    CartBean process(Map.Entry<String, List<JdataBean>> entry, Map<String, Integer> tempProductStock) throws Exception;
}
